import sys
sys.path.append("..")
import pyrtl
from  pyrtl import GPUSim
import or1200_definitions

# Default address and data buses width
aw = 5
dw = 24


class Or1200spram32x24(object):
    def __init__(self):
        # self.clk = pyrtl.Input(bitwidth=1, name='clk') # Clock
        self.rst = pyrtl.Input(bitwidth=1, name='rst')  # Reset
        self.ce = pyrtl.Input(bitwidth=1, name='ce')  # Chip enable input
        self.we = pyrtl.Input(bitwidth=1, name='we')  # Write enable input
        self.oe = pyrtl.Input(bitwidth=1, name='oe')  # Output enable input
        self.addr = pyrtl.Input(bitwidth=aw, name='addr')  # address bus inputs
        self.di = pyrtl.Input(bitwidth=dw, name='di')  # input data bus
        self.doq = pyrtl.Output(bitwidth=dw, name='doq')  # output data bus

        self.unconnected = pyrtl.WireVector(bitwidth=8, name="unconnected")
        ####################################
        # module connection
        ####################################

if __name__ == '__main__':
    or1200spram32x24 = Or1200spram32x24()
    print(pyrtl.working_block())